@import '~antd/es/style/themes/default.less';

html,
body,
#root {
  height: 100%;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  p {
    margin: 0;
  }
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;
    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;
        > span {
          display: block;
        }
      }
    }
  }
}

// 兼容IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

.mr8 {
  margin-right: 8px !important;
}
.ml4 {
  margin-left: 4px !important;
}
.my-editor {
  border: 1px solid #d1d1d1;
  border-radius: 5px;
}

.ant-pro-global-header-layout-mix {
  background-color: #8ca949 !important;
}
.qrCode {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.ant-form-item {
  .ant-select.select {
    width: 25%;
    margin-left: 4px;
    &:last-of-type {
      margin-right: 4px;
    }
  }
  .address {
    display: inline-block;
    width: 36%;
  }
}
.ant-table-thead > tr > th {
  background: #edf3f9 !important;
}
.ant-table-tbody > tr.ant-table-row:hover > td {
  background: #edf3f9 !important;
}
.reduce {
  margin-top: 6px;
  margin-right: 8px;
  color: #ff4d4f;
  font-size: 20px;
}
.add {
  margin-top: 6px;
  color: #8ca949;
  font-size: 20px;
}

// 禁止操作
.box {
  position: relative;
  .mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99;
    background: #ddd;
    opacity: 0.5;
  }
}

.site-badge .ant-badge-status-dot {
  width: 12px;
  height: 12px;
}

.errorIcon {
  margin-right: 24px;
  color: @error-color;
  span.anticon {
    margin-right: 4px;
  }
}
.ant-input[disabled] {
  color: #000 !important;
}
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
  color: #000 !important;
}
.ant-picker-input > input[disabled] {
  color: #000 !important;
}
.ant-radio-disabled + span {
  color: #000 !important;
}
.ant-checkbox-disabled + span {
  color: #000 !important;
}


@page {
  margin: 0;
  size: A4;
}
@media print {
  html,
  body {
    height: 100%;
    margin: 0;
    counter-reset: PageNumber;
  }
  .page-title {
    text-align: center;
  }

  .print-page {
    position: relative;
    height: 80%;
    padding: 2.54cm 1cm;
    page-break-after: always;

    .page-number {
      position: absolute;
      bottom: 1.32cm;
      left: 50%;
      width: 50px;
      margin-left: -25px;
      text-align: center;
      &::before {
        margin: 0;
        padding: 0;
        font-size: 9pt;
        content: '第' counter(PageNumber) '页';
        counter-increment: PageNumber;
      }
    }
  }

  .print-page-image {
    width: 100%;
    height: 100%;
    .page-number {
      bottom: 1cm;
    }
  }
}

.print-table-title {
  font-weight: 500;
  font-size: 20px;
  text-align: center;
}

.text-image-center {
  display: flex;
  align-items: center;
}

// 生长曲线打印样式
.print-page-image {
  canvas {
    margin: 0 auto;
  }
}
